/*
* INSANE - Interactive Structural Analysis Environment
*
* Copyright (C) 2003-2005
* Universidade Federal de Minas Gerais
* Escola de Engenharia
* Departamento de Engenharia de Estruturas
* 
* Author's email :    insane@dees.ufmg.br
* Author's website :  http://www.dees.ufmg.br/insane
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
package br.ufmg.dees.insane.materialMedia.material;

import java.util.HashMap;

import br.ufmg.dees.insane.util.IMatrix;

/** A class representing PolarLinearElasticIsotropic
 * @author Jamile Fuina
 * @since 15/11/2005
 */
public class PolarLinearElasticIsotropic extends LinearElasticIsotropic {

	private static final long serialVersionUID = 1L;

	/** The zero value of this Material.*/
    private static final double zero = 0.0001; 
	
	/** The keys for the Map. */
    /** Proportionality coefficient among strain and stress antisymmetric tensors.*/
	public final String ALPHA = "ALPHA";
	
	/** Proportionality coefficient among strain and couple-stress antisymmetric tensors.*/
	public final String ETA = "ETA";
	
	/** Characteristic length of the Material to the bending.*/
	public final String LENGTH_BENDING = "LENGTH_BENDING";
	
	/** Characteristic length of the Material to the torsion. */
	public final String LENGTH_TORSION = "LENGTH_TORSION";
    	
	/**Constructs a Polar Linear Elastic Isotropic Material and sets its label to "PolarLinearElasticIsotropic".*/
	public PolarLinearElasticIsotropic()
	{
		this.label = "PolarLinearElasticIsotropic";
		this.materialValues = new HashMap<String, Double>(8);	// Qual o tamanho do mapa?
	}
	
	/**Constructs a Polar Linear Elastic Isotropic Material and sets its label to "PolarLinearElasticIsotropic". 
	 * @param elast The modulus of elasticity.
	 * @param ni The Poisson's ratio.
	 * @param alpha The proportionality coefficient among strain and stress antisymmetric tensors.
	 * @param eta The proportionality coefficient among strain and couple-stress antisymmetric tensors.
	 * @param lf The characteristic length of the Material to the bending.
	 * @param lt The characteristic length of the Material to the torsion.
	 */
	public PolarLinearElasticIsotropic(double elast, double ni, double alpha, double eta, double lf, double lt)
	{
		this.label = "PolarLinearElasticIsotropic";
		this.materialValues = new HashMap<String, Double>(6);
		this.setMaterialValues(this.ELASTICITY, elast);
		this.setMaterialValues(this.POISSON, ni);
		this.setMaterialValues(this.ALPHA, alpha);
		this.setMaterialValues(this.ETA, eta);
		this.setMaterialValues(this.LENGTH_BENDING, lf);
		this.setMaterialValues(this.LENGTH_TORSION, lt);
		this.setMaterialValues(this.SHEAR_MODULUS, this.getShearModulus());
	}
	
	/**Constructs a Polar Linear Elastic Isotropic Material and sets its label to "PolarLinearElasticIsotropic". 
	 * @param elast The modulus of elasticity.
	 * @param shearmod The shear modulus.
	 * @param ni The Poisson's ratio.
	 * @param alpha The proportionality coefficient among strain and stress antisymmetric tensors.
	 * @param eta The proportionality coefficient among strain and couple-stress antisymmetric tensors.
	 * @param lf The characteristic length of the Material to the bending.
	 * @param lt The characteristic length of the Material to the torsion.
	 */
	public PolarLinearElasticIsotropic(double elast, double shearmod, double ni, double alpha, double eta, double lf, double lt)
	{
		this.label = "PolarLinearElasticIsotropic";
		this.materialValues = new HashMap<String, Double>(3,1);
		this.setMaterialValues(this.ELASTICITY, elast);
		this.setMaterialValues(this.SHEAR_MODULUS, shearmod);
		this.setMaterialValues(this.POISSON, ni);
		this.setMaterialValues(this.ALPHA, alpha);
		this.setMaterialValues(this.ETA, eta);
		this.setMaterialValues(this.LENGTH_BENDING, lf);
		this.setMaterialValues(this.LENGTH_TORSION, lt);
		this.setMaterialValues(this.SHEAR_MODULUS, this.getShearModulus());
	}
	
	/**Constructs a Polar Linear Elastic Isotropic Material and sets its label to "PolarLinearElasticIsotropic". 
	 * @param elast The modulus of elasticity.
	 * @param shearmod The shear modulus.
	 * @param ni The Poisson's ratio.
	 * @param thermalcoeff The coefficient of thermal expansion.
	 * @param alpha The proportionality coefficient among strain and stress antisymmetric tensors.
	 * @param ETA The proportionality coefficient among strain and couple-stress antisymmetric tensors.
	 * @param lf The characteristic length of the Material to the bending.
	 * @param lt The characteristic length of the Material to the torsion.
	 */
	public PolarLinearElasticIsotropic(double elast, double shearmod, double ni, double thermalcoeff, double alpha, double eta, double lf, double lt)
	{
		this.label = "PolarLinearElasticIsotropic";
		this.materialValues = new HashMap<String, Double>(4,1);
		this.setMaterialValues(this.ELASTICITY, elast);
		this.setMaterialValues(this.SHEAR_MODULUS, shearmod);
		this.setMaterialValues(this.POISSON, ni);
		this.setMaterialValues(this.THERMAL_COEFF, thermalcoeff);
		this.setMaterialValues(this.ALPHA, alpha);
		this.setMaterialValues(this.ETA, eta);
		this.setMaterialValues(this.LENGTH_BENDING, lf);
		this.setMaterialValues(this.LENGTH_TORSION, lt);
		this.setMaterialValues(this.SHEAR_MODULUS, this.getShearModulus());
	}
	
	  
    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt()
     */
    public IMatrix getPt() {
        IMatrix Pt = new IMatrix(6,6);
		Pt.setZero();
        Pt.setElement(0,0,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(0,1,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(0,2,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(0,3,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(0,4,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(0,5,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(1,0,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(1,1,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(1,2,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(1,3,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(1,4,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(1,5,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,0,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(2,1,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(2,2,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(2,3,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,4,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,5,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(3,0,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(3,1,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(3,2,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(3,3,this.getShearModulus());
        Pt.setElement(4,0,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(4,1,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(4,2,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(4,4,this.getShearModulus());
        Pt.setElement(5,0,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(5,1,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(5,2,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(5,5,this.getShearModulus());
        return Pt;
    }
    

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt(br.ufmg.dees.insane.util.IMatrix)
     */
    public IMatrix getPt(IMatrix e) {
        IMatrix Pt = new IMatrix(6,6);
		Pt.setZero();
        Pt.setElement(0,0,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(0,1,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(0,2,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(0,3,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(0,4,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(0,5,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(1,0,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(1,1,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(1,2,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(1,3,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(1,4,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(1,5,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,0,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(2,1,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(2,2,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(2,3,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,4,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,5,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(3,0,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(3,1,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(3,2,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(3,3,this.getShearModulus());
        Pt.setElement(4,0,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(4,1,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(4,2,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(4,4,this.getShearModulus());
        Pt.setElement(5,0,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(5,1,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(5,2,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(5,5,this.getShearModulus());
        return Pt;
    }
    
    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt11(double)
     */
    public double getPt11(double e11) {
        return this.getMaterialValues(this.ELASTICITY).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt12(double)
     */
    public double getPt12(double e12) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt13(double)
     */
    public double getPt13(double e13) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt14(double)
     */
    public double getPt14(double e14) {
        return this.getMaterialValues(this.LENGTH_TORSION).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt15(double)
     */
    public double getPt15(double e15) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt16(double)
     */
    public double getPt16(double e16) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt21(double)
     */
    public double getPt21(double e21) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt22(double)
     */
    public double getPt22(double e22) {
        return this.getMaterialValues(this.ELASTICITY).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt23(double)
     */
    public double getPt23(double e23) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt24(double)
     */
    public double getPt24(double e24) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt25(double)
     */
    public double getPt25(double e25) {
    	return this.getMaterialValues(this.LENGTH_TORSION).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt26(double)
     */
    public double getPt26(double e26) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt31(double)
     */
    public double getPt31(double e31) {
        return this.getMaterialValues(this.POISSON).doubleValue();
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt32(double)
     */
    public double getPt32(double e32) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt33(double)
     */
    public double getPt33(double e33) {
        return this.getMaterialValues(this.ELASTICITY).doubleValue();
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt34(double)
     */
    public double getPt34(double e34) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt35(double)
     */
    public double getPt35(double e35) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt36(double)
     */
    public double getPt36(double e36) {
    	return this.getMaterialValues(this.LENGTH_TORSION).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt41(double)
     */
    public double getPt41(double e41) {
    	return this.getMaterialValues(this.LENGTH_BENDING).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt42(double)
     */
    public double getPt42(double e42) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt43(double)
     */
    public double getPt43(double e43) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt44(double)
     */
    public double getPt44(double e44) {
        return this.getShearModulus();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt45(double)
     */
    public double getPt45(double e45) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt46(double)
     */
    public double getPt46(double e46) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt51(double)
     */
    public double getPt51(double e51) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt52(double)
     */
    public double getPt52(double e52) {
    	return this.getMaterialValues(this.LENGTH_BENDING).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt53(double)
     */
    public double getPt53(double e53) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt54(double)
     */
    public double getPt54(double e54) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt55(double)
     */
    public double getPt55(double e55) {
    	return this.getShearModulus();
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt56(double)
     */
    public double getPt56(double e56) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt61(double)
     */
    public double getPt61(double e61) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt62(double)
     */
    public double getPt62(double e62) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt63(double)
     */
    public double getPt63(double e63) {
    	return this.getMaterialValues(this.LENGTH_BENDING).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt64(double)
     */
    public double getPt64(double e64) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt65(double)
     */
    public double getPt65(double e65) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPt66(double)
     */
    public double getPt66(double e66) {
    	return this.getShearModulus();
        }


    
    
    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs()
     */
    public IMatrix getPs() {
    	IMatrix Pt = new IMatrix(6,6);
		Pt.setZero();
        Pt.setElement(0,0,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(0,1,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(0,2,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(0,3,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(0,4,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(0,5,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(1,0,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(1,1,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(1,2,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(1,3,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(1,4,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(1,5,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,0,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(2,1,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(2,2,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(2,3,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,4,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,5,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(3,0,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(3,1,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(3,2,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(3,3,this.getShearModulus());
        Pt.setElement(4,0,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(4,1,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(4,2,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(4,4,this.getShearModulus());
        Pt.setElement(5,0,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(5,1,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(5,2,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(5,5,this.getShearModulus());
        return Pt;
    }
    
    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs(br.ufmg.dees.insane.util.IMatrix)
     */
    public IMatrix getPs(IMatrix e) {
    	IMatrix Pt = new IMatrix(6,6);
		Pt.setZero();
        Pt.setElement(0,0,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(0,1,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(0,2,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(0,3,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(0,4,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(0,5,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(1,0,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(1,1,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(1,2,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(1,3,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(1,4,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(1,5,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,0,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(2,1,(this.getMaterialValues(this.POISSON).doubleValue()));
        Pt.setElement(2,2,(this.getMaterialValues(this.ELASTICITY).doubleValue()));
        Pt.setElement(2,3,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,4,(this.getMaterialValues(this.ETA).doubleValue()));
        Pt.setElement(2,5,(this.getMaterialValues(this.LENGTH_TORSION).doubleValue()));
        Pt.setElement(3,0,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(3,1,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(3,2,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(3,3,this.getShearModulus());
        Pt.setElement(4,0,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(4,1,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(4,2,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(4,4,this.getShearModulus());
        Pt.setElement(5,0,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(5,1,(this.getMaterialValues(this.ALPHA).doubleValue()));
        Pt.setElement(5,2,(this.getMaterialValues(this.LENGTH_BENDING).doubleValue()));
        Pt.setElement(5,5,this.getShearModulus());
        return Pt;
    } 
    
    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs11(double)
     */
    public double getPs11(double e11) {
        return this.getMaterialValues(this.ELASTICITY).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs12(double)
     */
    public double getPs12(double e12) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs13(double)
     */
    public double getPs13(double e13) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs14(double)
     */
    public double getPs14(double e14) {
        return this.getMaterialValues(this.LENGTH_TORSION).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs15(double)
     */
    public double getPs15(double e15) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs16(double)
     */
    public double getPs16(double e16) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs21(double)
     */
    public double getPs21(double e21) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs22(double)
     */
    public double getPs22(double e22) {
        return this.getMaterialValues(this.ELASTICITY).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs23(double)
     */
    public double getPs23(double e23) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs24(double)
     */
    public double getPs24(double e24) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs25(double)
     */
    public double getPs25(double e25) {
    	return this.getMaterialValues(this.LENGTH_TORSION).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs26(double)
     */
    public double getPs26(double e26) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs31(double)
     */
    public double getPs31(double e31) {
        return this.getMaterialValues(this.POISSON).doubleValue();
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs32(double)
     */
    public double getPs32(double e32) {
        return this.getMaterialValues(this.POISSON).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs33(double)
     */
    public double getPs33(double e33) {
        return this.getMaterialValues(this.ELASTICITY).doubleValue();
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs34(double)
     */
    public double getPs34(double e34) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs35(double)
     */
    public double getPs35(double e35) {
    	return this.getMaterialValues(this.ETA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs36(double)
     */
    public double getPs36(double e36) {
    	return this.getMaterialValues(this.LENGTH_TORSION).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs41(double)
     */
    public double getPs41(double e41) {
    	return this.getMaterialValues(this.LENGTH_BENDING).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs42(double)
     */
    public double getPs42(double e42) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs43(double)
     */
    public double getPs43(double e43) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs44(double)
     */
    public double getPs44(double e44) {
        return this.getShearModulus();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs45(double)
     */
    public double getPs45(double e45) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs46(double)
     */
    public double getPs46(double e46) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs51(double)
     */
    public double getPs51(double e51) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs52(double)
     */
    public double getPs52(double e52) {
    	return this.getMaterialValues(this.LENGTH_BENDING).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs53(double)
     */
    public double getPs53(double e53) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs54(double)
     */
    public double getPs54(double e54) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs55(double)
     */
    public double getPs55(double e55) {
    	return this.getShearModulus();
        }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs56(double)
     */
    public double getPs56(double e56) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs61(double)
     */
    public double getPs61(double e61) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs62(double)
     */
    public double getPs62(double e62) {
    	return this.getMaterialValues(this.ALPHA).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs63(double)
     */
    public double getPs63(double e63) {
    	return this.getMaterialValues(this.LENGTH_BENDING).doubleValue();
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs64(double)
     */
    public double getPs64(double e64) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs65(double)
     */
    public double getPs65(double e65) {
        return zero;
    }

    /* (non-Javadoc)
     * @see br.ufmg.dees.insane.materialMedia.material.Material#getPs66(double)
     */
    public double getPs66(double e66) {
    	return this.getShearModulus();
        }
    
    /** Returns the shear modulus of this Material.
     * @return The shear modulus.
     */
    public double getShearModulus(){
        double shearModulus = this.getMaterialValues(this.ELASTICITY).doubleValue() / (2*(1 + this.getMaterialValues(this.POISSON).doubleValue()));
        return shearModulus;
    }
}
